#
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

4G_MENU:=4G modules Support

define AddDepends/4g-modules
  SUBMENU:=$(4G_MENU)
  DEPENDS:=@USB_SUPPORT kmod-usb-core kmod-usb-net $(1)
endef

define KernelPackage/4g-modules
  SUBMENU:=$(4G_MENU)
  TITLE:=4G modules Support
  KCONFIG:=CONFIG_4G_SUPPORT=y
  $(call AddDepends/4g-modules,)
endef

define KernelPackage/4g-modules/description
 Kernel support for 4g modules
endef

$(eval $(call KernelPackage,4g-modules))


define KernelPackage/4g-module-boardmobi
  SUBMENU:=$(4G_MENU)
  TITLE:=Support BoardMobi 4G module
  KCONFIG:=CONFIG_4G_MODULE_BOARDMOBI
  FILES:=$(LINUX_DIR)/drivers/4gmodules/BoardMobi/bm_gobi_net.ko
  $(call AddDepends/4g-modules,kmod-4g-modules)
endef

define KernelPackage/4g-module-boardmobi/description
 This package contains the BoardMobi 4G module driver
endef

$(eval $(call KernelPackage,4g-module-boardmobi))

define KernelPackage/4g-module-leadercore
  SUBMENU:=$(4G_MENU)
  TITLE:=Support LeaderCore 4G module
  KCONFIG:=CONFIG_4G_MODULE_LEADERCORE
  FILES:=$(LINUX_DIR)/drivers/4gmodules/LeaderCore/lc_ltencm.ko
  $(call AddDepends/4g-modules,kmod-4g-modules)
endef

define KernelPackage/4g-module-leadercore/description
 This package contains the LeaderCore 4G module driver
endef

$(eval $(call KernelPackage,4g-module-leadercore))

define KernelPackage/4g-module-quectel
  SUBMENU:=$(4G_MENU)
  TITLE:=Support Quectel 4G module
  KCONFIG:=CONFIG_4G_MODULE_QUECTEL
  FILES:=$(LINUX_DIR)/drivers/4gmodules/Quectel/EC20GobiNet.ko
  $(call AddDepends/4g-modules,kmod-4g-modules)
endef

define KernelPackage/4g-module-quectel/description
 This package contains the Quectel 4G module driver
endef

$(eval $(call KernelPackage,4g-module-quectel))
